<template>
    <el-container>
        <el-aside width="180px">
            <el-menu >
                <el-menu-item @click="onSeletType('inventory')" index="inventory" ><el-text>库存</el-text></el-menu-item>
                <el-menu-item @click="onSeletType('ins')" index="ins" ><el-text>入库</el-text></el-menu-item>
                <el-menu-item @click="onSeletType('outs')" index="outs" ><el-text>出库</el-text></el-menu-item>
            </el-menu>
        </el-aside>
        <el-main class="pt0">
            <component v-if="type == 'inventory'" :is="inventory" />
            <component v-if="type == 'ins'" :is="ins" />
            <component v-if="type == 'outs'" :is="outs" />
        </el-main>
    </el-container>
</template>
<script lang="ts" setup>
import { ref,onMounted } from 'vue'
import inventory from './inventory.vue';
import ins from './ins.vue';
import outs from './outs.vue';

const type = ref<string>('inventory')



const onSeletType = (data:string) => {
    type.value = data
}

onMounted(()=>{
    onSeletType('inventory')
})

</script>

<style scoped>

</style>